package cn.gjculture.shopping.api.util;

import cn.gjculture.shopping.api.entity.Return;
import org.springframework.util.CollectionUtils;

import java.util.List;

public class CommonUtils {

    public static Return setRetForList(List list, Return ret){
        ret.setData(list);
        if(!CollectionUtils.isEmpty(list)){
            ret.getCommon().setRet(true);
        }
        return ret;
    }
}
